@import (once) "../../include/vars";
@import (once) "../../include/mixins";

:root {
    --double-select-border-radius: 4px;
    --double-select-border-color: var(--border-color);
    --double-select-item-background-active: #e6e6e6;
    --double-select-item-color-active: #191919;
    --double-select-item-background-hover: #e6e6e6;
    --double-select-item-color-hover: #191919;
}

.dark-side {
    --double-select-border-color: var(--border-color);
    --double-select-item-background-active: #2c2d30;
    --double-select-item-color-active: #efefef;
    --double-select-item-background-hover: #2c2d30;
    --double-select-item-color-hover: #efefef;
}

.double-select-box {
    display: flex;
    flex-flow: row nowrap;
}

.double-select-box {
    
    select {
        display: none;
    }

    .controls {
        padding: 10px;
        display: inline-flex;
        flex-flow: column;
        align-items: center;
        justify-content: center;
    }

    .controls {
        .button {
            margin: 1px;
            font-size: 22px;
            vertical-align: middle;
            
            .icon {
                display: flex;
                align-items: center;
                justify-content: center;
                transform: translateY(-2px);
            }
        }
    }

    ul {
        display: block;
        position: relative;
        border: 1px solid var(--double-select-border-color);
        flex: 1 1 100%;
        margin: 0;
        overflow-y: auto;
        padding: 2px;
        border-radius: var( --double-select-border-radius );

        li {
            display: flex;
            flex-flow: row nowrap;
            position: relative;
            cursor: default;
            padding: 4px 10px;
            font-size: 14px;
            user-select: none;
            border-radius: 4px;
            align-items: center;
            justify-content: flex-start;

            .icon {
                width: 18px;
                height: 18px;
                margin-right: 6px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 18px;
                
                * {
                    pointer-events: none;
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: flex;
                    align-items: center;
                }
            }
            
            &.active {
                background: var(--double-select-item-background-active);
                color: var(--double-select-item-color-active);
            }

            &:hover {
                background: var(--double-select-item-background-hover);
                color: var(--double-select-item-color-hover);
            }
        }
    }
}

